<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<div id="app">
    <input type="button" value="点击" @click="doIt('加油','老铁')"></input>
    <input type="text" @keyup.enter="sayhello"></input>
</div>

<script>
    var app = new Vue({
        el:"#app",
        data:{

        },
        methods:{
            doIt:function (p1,p2) {
                console.log("做IT")
                console.log(p1)
                console.log(p2)
            },
            sayhello:function () {
                alert("你好")

            }

        }
    })
</script>
</body>
</html>
